package com.uchengwang.ui.cm_ui.cycle.adapter;

import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by U城网 on 2018/1/24.
 */

public abstract class BaseCycleAdapter  <T,VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH>{
    protected List<T> list = new ArrayList<T>();

    public List<T> getData() {
        if (list==null)
            list = new ArrayList<T>();
        return list;
    }

    public void setData(List<T> datas) {
        this.list = datas;
        notifyDataSetChanged();
    }
}
